package com.niit.onlinemusic.controller;

import com.niit.onlinemusic.common.R;
import com.niit.onlinemusic.service.BannerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * BannerController
 *
 * @author zuwei522
 * @since 2025/9/28 23:19
 */
@RestController
@RequestMapping("banner")
public class BannerController {

    private final BannerService bannerService;

    public BannerController(BannerService bannerService) {
        this.bannerService = bannerService;
    }

    @GetMapping("getAllBanner")
    public R getAllBanner() {
        return R.success("获取轮播图成功", bannerService.list());
    }

}
